#define header(page_flag)
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    #if(page_flag == 'default')
        <meta name="keywords" content="#(SEO_KEYWORDS ??)">
        <meta name="description" content="#(SEO_DESCRIPTION ??)">
        <title>#(SEO_TITLE ?? (WEB_TITLE + '-' + WEB_SUBTITLE))</title>
    #end
    #if(page_flag == 'search')
        <meta name="keywords" content="#(SEO_KEYWORDS ??)">
        <meta name="description" content="#(SEO_DESCRIPTION ??)">
        <title>搜索 #(WEB_TITLE) 结果</title>
    #end
    #if(page_flag == 'post')
    <meta name="keywords" content="#(article.title ??), #(SEO_KEYWORDS ??)">
    <meta name="description" content="#maxLength(article.text,150)">
    <title>#(article.title + '&nbsp;-&nbsp;' +  WEB_TITLE)</title>
    #end
    #if(page_flag == 'page')
    <meta name="keywords" content="#(page.title ??), #(SEO_KEYWORDS ??)">
    <meta name="description" content="#maxLength(page.content,150)">
    <title>#(page.title + '&nbsp;-&nbsp;' +  WEB_TITLE)</title>
    #end
    <link rel='stylesheet' href='#(CPATH)/templates/LivingCoral/static/css/style.min.css' type='text/css' media='all'/>
    <link rel='stylesheet'href='#(CPATH)/templates/LivingCoral/static/css/smartideo.css' type='text/css' media='screen'/>
    <link href="#(CPATH)/templates/LivingCoral/static/css/jimu.css" rel="stylesheet">
    <link rel='stylesheet' href='#(CPATH)/templates/LivingCoral/static/css/iconfont.css' type='text/css' media='all'/>
    <link rel='stylesheet' href='#(CPATH)/templates/LivingCoral/static/css/nicetheme.css' type='text/css' media='all'/>
    <link rel='stylesheet' href='#(CPATH)/templates/LivingCoral/static/css/style.css' type='text/css' media='all'/>
    <link rel="stylesheet" href="#(CPATH)/templates/LivingCoral/static/css/font-awesome.min.css">
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery-migrate/1.4.1/jquery-migrate.min.js"></script>
    #if(page_flag == 'post' || page_flag == 'page')
    <script src='https://unpkg.com/valine/dist/Valine.min.js'></script>
    #end
    <link rel="icon"
          href="#(CPATH)#option('livingCoral_favicon','/templates/LivingCoral/static/images/favicon.jpg')"
          sizes="32x32"/>
    <link rel="icon"
          href="#(CPATH)#option('livingCoral_favicon','/templates/LivingCoral/static/images/favicon.jpg')"
          sizes="192x192"/>
    <link rel="apple-touch-icon-precomposed"
          href="#(CPATH)#option('livingCoral_favicon','/templates/LivingCoral/static/images/favicon.jpg')"/>
    <meta name="msapplication-TileImage"
          content="#(CPATH)#option('livingCoral_favicon','/templates/LivingCoral/static/images/favicon.jpg')"/>
</head>
<body class="home blog post-template-default single single-post single-format-standard">
<header class="header shadow-2x">
    <div class="container">
        <div class="row justify-content-lg-center">
            <div class="col-12 col-lg-9">
                <nav class="navbar navbar-expand-lg px-0 py-2 py-lg-4">
                    <!-- brand -->
                    <a href="/#" class="navbar-brand">
                        <img class="nc-no-lazy" height="80" width="80" src="#(CPATH)#option('livingCoral_logo','/templates/LivingCoral/static/images/logo.png')" alt="#(WEB_TITLE ??)">
                        <span>姑苏的猫</span>
                    </a>
                    <!-- / brand -->
                    <!-- Navbar collapse -->
                    <div class="collapse navbar-collapse order-2 order-lg-1">
                        <ul class="navbar-nav mx-auto main-menu" data-nav>
                            #for(menu : MENUS)
                            <li class="menu-item menu-item-type-custom menu-item-object-custom #(menu.isActive ? 'current-menu-item' : '') #(menu.getChilds() != null ? 'menu-item-has-children' : '') menu-item-home">
                                <a href="#(menu.url ??)" target="#(menu.target ??)" aria-current="page">#(menu.text ??)</a>
                                #if(menu.getChilds() != null)
                                    <ul class="sub-menu">
                                        #for(childMenu : menu.getChilds())
                                        <li> <a href="#(menu.url ??)">#(childMenu.text ??)</a> </li>
                                        #end
                                    </ul>
                                #end
                            </li>
                            #end
                        </ul>
                    </div>
                    <div class="nav navbar-menu sign-menu order-1 order-lg-2">
                        <a href="javascript:" class="d-inline-block action-search action-sidebar"><i
                                class="text-lg iconfont icon-search-outline"></i></a>
                        <a href="javascript:" class="d-inline-block d-lg-none action-menu pl-4"><i
                                class="text-lg iconfont icon-menu-outline"></i></a>
                    </div>
                </nav>
                #if(page_flag == 'post')
                <div class="breadcrumbs text-xs pt-2 pb-3 px-1 d-none d-md-block">
                    <span itemprop="itemListElement">
                        <a href="/" itemprop="item" class="home">
                            <span itemprop="name" class="text-muted">首页</span></a>
                    </span>
                    <span class="sep text-muted"><i class="iconfont icon-arrow-ios-forward-ou mx-1"></i></span>

                    #articleCategories(article.id,"category")
                    #for(category : categories)
                    <span itemprop="itemListElement">
                        <a href="#(category.url ??)" itemprop="item">
                        <span itemprop="name" class="text-muted">#(category.title ??)</span></a>
                    </span>
                    <span class="sep text-muted"><i class="iconfont icon-arrow-ios-forward-ou mx-1"></i></span>
                    #end
                    #end
                    <span class="current">#(article.title)</span>
                </div>
                #end
            </div>
        </div>
    </div>
</header>
<div class="mobile-navbar">
    <div class="mobile-menu p-4 p-md-5">
        <a class="action-menu btn btn-light px-2 mb-4"><i class="text-lg iconfont icon-close-outline"></i></a>
        <ul class="navbar-nav">
            #for(menu : MENUS)
            <li class="menu-item menu-item-type-custom menu-item-object-custom #(menu.isActive ? 'current-menu-item' : '') #(menu.getChilds() != null ? 'menu-item-has-children' : '') menu-item-home">
                <a href="#(menu.url ??)" target="#(menu.target ??)" aria-current="page">#(menu.text ??)</a>
                #if(menu.getChilds() != null)
                <ul class="sub-menu">
                    #for(childMenu : menu.getChilds())
                    <li> <a href="#(menu.url ??)">#(childMenu.text ??)</a> </li>
                    #end
                </ul>
                #end
            </li>
            #end
        </ul>
    </div>
</div>
<div class="sidebar-collapse">
    <aside class="sidebar p-4 p-md-5">
        <a href="javascript:" class="action-search btn btn-light px-2 mb-4"><i
                class="text-lg iconfont icon-close-outline"></i></a>
        <div class="widget widget-search mb-5">
            <div class="widget-title h6 mb-4">
                <span class="nice-b-line">搜索</span>
            </div>
            <div class="widget-content">
                <div class="search-input form-group mb-4">
                    <form action="/article/search" method="get">
                        <input type="text" placeholder="请输入搜索关键词" name="keyword" class="form-control" required="" autocomplete="off">
                        <button class="btn" type="submit" value=""><i class="iconfont icon-search-outline"></i></button>
                    </form>
                </div>

                <div class="search-result">
                    <ul></ul>
                    <div class="loadmore text-sm mt-3" style="display: none"><a href="#" class="text-muted">加载更多...</a>
                    </div>
                </div>
            </div>
        </div>
        <div id="recent-posts-2" class="widget widget_recent_entries mb-5">
            <div class="widget-title h6 mb-4"><span class="nice-b-line">近期文章</span></div>
            <ul>
                #articles(orderBy="created desc")
                    #for(article : articles)
                <li>
                    <a href="#(article.url ??)" title="#(article.title ??)">#(article.title ??)</a>
                    <span class="post-date">#date(article.created, "yyyy年MM月dd日")</span>
                </li>
                    #end
                #end
            </ul>
        </div>
        <div id="media_image-2" class="widget widget_media_image mb-5">
          
            <a href="#option('livingCoral_ad_url')" target="_blank"><img
                width="750" height="150" src="#(CPATH)#option('livingCoral_ad','/templates/LivingCoral/static/images/livingCoral_ad.jpg')"
                class="image wp-image-4174  attachment-full size-full" alt="" style="max-width: 100%; height: auto;"/></a>
                </div>
        <div id="tag_cloud-2" class="widget widget_tag_cloud mb-5">
            <div class="widget-title h6 mb-4"><span class="nice-b-line">标签</span></div>
            <div class="tagcloud">
                #tags(orderBy="count DESC")
                    #for(tag : tags)
                    <a href="#(tag.url)"
                       class="tag-cloud-link" style="font-size: 8pt;"
                       aria-label="#(tag.title)">#(tag.title)</a>
                    #end
                #end
            </div>
        </div>
        <div id="text-2" class="widget widget_text mb-5">
            <div class="widget-title h6 mb-4"><span class="nice-b-line">关于我</span></div>
            <div class="textwidget"><a href="https://www.islery.com/关于我" title="关于我" > <p>#option("livingCoral_about" ??)</p></a>
            </div>
        </div>
        <div id="categories-2" class="widget widget_categories mb-5">
            <div class="widget-title h6 mb-4"><span class="nice-b-line">目录</span></div>
            <ul>
                #categories()
                #for(category : categories)
                <li class="cat-item cat-item-1"><a href="#(category.url ??)"
                                                   title="#(category.title ??)">#(category.title ??)</a>
                    (#(category.count))
                </li>
                <a href="#(category.url ??)"></a>
                #end
                #end
            </ul>
        </div>
    </aside>
</div>
<div class="bg-overlay"></div>
#end